package com.zgc.controller;


import com.zgc.common.R;

import com.zgc.service.EmpRoleService;

import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;

@Slf4j
@RestController
@RequestMapping("/empAndRole")
public class EmpAndRoleController {
    @Autowired
    private EmpRoleService empRoleService;
    /**
     * 新增中间表
     *
     * @param
     * @return
     */
    @GetMapping
    public R<String> save(HttpServletRequest request, @RequestParam("id") String
            id,@RequestParam("roleid") String roleid) {
        log.info("id========：{},roleid======:{}", id,roleid);
        empRoleService.saveAll(id,roleid);
        return R.success("角色配置成功");
    }
}